import request from '@/utils/request'

export default {
  loginByLoginname: (data) => {
    return request({
      url: '/admin/login',
      method: 'post',
      data
    })
  },
  logout: (data) => {
    return request({
      url: '/admin/logout',
      method: 'post',
      data
    })
  },
  add: (data) => {
    return request({
      url: '/admin/new',
      method: 'post',
      data
    })
  },
  update: (data) => {
    return request({
      url: '/admin/update',
      method: 'post',
      data
    })
  },
  updatePwd: (data) => {
    return request({
      url: '/admin/updatepassword',
      method: 'post',
      data
    })
  },
  resetPwd: (data) => {
    return request({
      url: '/admin/resetpassword',
      method: 'post',
      data
    })
  },
  list: (data) => {
    return request({
      url: '/admin/list',
      method: 'post',
      data
    })
  },
  delete: (data) => {
    return request({
      url: '/admin/delete',
      method: 'post',
      data
    })
  }
}
